package com.tn.rtdata.examples.stockticker.client;

import com.tn.rtdata.examples.stockticker.StockTick;
import com.tn.rtdata.util.Function;

/**
 * An implementation of <code>Function</code> that returns the key for a <code>StockTick</code>.
 */
public class StockTickKeyGetter implements Function<String, StockTick>
{
  /**
   * {@inheritDoc}
   */
  @Override
  public String execute(StockTick stockTick)
  {
    return stockTick.getStockId();
  }
}
